package com.itheima.mapper;

import com.itheima.pojo.CheckItem;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface CheckItemDao {
    List<CheckItem> findPage(String queryString);

    void addCheckItem(CheckItem checkItem);

    @Select("select * from t_checkitem where id = #{id}")
    CheckItem findById(Integer id);

    void editCheckItem(CheckItem checkItem);

    @Delete("delete from t_checkitem where id = #{id}")
    void deleteById(Integer id);

    //根据id数组查询检查项
    List<CheckItem> findByIds(Integer[] checkitemIds);

    @Select("select * from t_checkitem")
    List<CheckItem> findAll();
}
